/**
 * @author Rock
 * @create 2020-08-14 23:48
 */
public class ShuzuNiXu {
    public static void main(String[] args) {
        int[] arr = {12,23,58,64,78,82,99};
        System.out.print("原数组：");
        for (int i = 0; i < arr.length; i++) {
            System.out.print(arr[i]+" ");
        }
        System.out.println("");

        int temp = 0;
        for (int i = 0; i < arr.length / 2; i++) {
            if (arr[i]<arr[arr.length-1-i]){
                temp = arr[i];
                arr[i] = arr[arr.length-1-i];
                arr[arr.length-1-i] = temp;
            }
        }

        System.out.print("反转后数组：");
        for (int i = 0; i < arr.length; i++) {
            System.out.print(arr[i]+" ");
        }
    }
}
